package edu.sctu.practice.class02.liqing.test02;

/**
 * Created by 123456 on 2015/10/9.
 */
public class Vehicle {
    double speed;
    double size;

    public Vehicle(double speed, double size) {
        this.speed = speed;
        this.size = size;
        System.out.println("速度: " + speed);
        System.out.println("体积: " + size);
    }

    public void move() {
        System.out.println("move");
    }

    public void speedUp(double speed) {
        this.speed += speed;
        System.out.println("加速了 " + speed + "加速后的速度为：" + this.speed);
    }

    public void speedDown(double speed) {
        this.speed -= speed;
        System.out.println("减速了" + speed + "减速后的速度为：" + this.speed);
    }
}
